<?php
include_once dirname(__FILE__).'/_config.php';

$__file = dirname(__FILE__).(str_replace(array('//', '..'), array('/', '.'), "/{$__frm}/{$__mdl}.{$__do}.php"));
$__tpl = array(
	'file'		=> '_m.html',
	'header'	=> $__mdl == 'ajax' ? '' : '_header.tpl',
	'footer'	=> $__mdl == 'ajax' ? '' : '_footer.tpl',
	'path'		=> empty($__frm) ? '' : "{$__frm}/",
	'body'		=> trim(str_replace(array('//', '..'), array('/', '.'), "{$__mdl}.{$__do}.html"), '/'),
	'formAction'=> "{$__mdl}_{$__do}",
);
	
$__l = ea_read_language($__f_lang_setting, "gm_{$__mdl}");

// 查看源代码
if((defined('DEBUG_PR') && DEBUG_PR == true) || (defined('DEBUG_FB') && DEBUG_FB == true)){
	if(isset($_GET['source']) && $_GET['source'] == 'yes'){
		highlight_file($__file);
		exit;
	}
}

if(file_exists($__file)){
	include_once $__file;
}else{
	$__tpl_file = $__tpl_pth.$__tpl['path'].$__tpl['body'];
	if(!file_exists($__tpl_file)){
		exit("Template file {$__tpl_file} not exist.");
	}
}

include_once dirname(__FILE__).'/_flush.php';

?>